package game.classes;

import game.sound.ImpactSound;
import game.sound.PlutonBlast;
import java.util.Vector;

/**
 * @author Jowén
 */
public class Pluton extends GameObject {

    public static final int WIDTH = 20;
    public static final int HEIGHT = 24;
    private int reward;
    private int step;

    public Pluton(int reward) {
        super("pluton.gif", 0, 0);
        this.reward = reward;
        step = GODOWN;
    }

    public int getReward() {
        return reward;
    }

    public int getStep() {
        return step;
    }

    public void toggleStep() {
        step = -step;
    }

    public void moveX() {
        setX(getX() + step);
    }

    public void moveY() {
        setY(getY() + (HEIGHT / 2));
        //setY(getY() + 10);
    }

    public void fire(Vector shots) {
        shots.add(new Shot(getX() + (WIDTH / 2) - (Shot.WIDTH / 2), getY(), GODOWN, false));
        new PlutonBlast();
    }

    public void impacted() {
        new ImpactSound();
    }
}
